if strcmp(signal, 'off')
    I = sco_IQ*randn(N_f, N_t) ;
    Q = sco_IQ*randn(N_f, N_t) ;
    X2 = I.^2 + Q.^2;
    Mem(j) = max(max(X2));
elseif strcmp(signal, 'on')
    dtau = tau(j) - tau_tilda_m;
    domega = omega(j) - omega_tilda_m;
    I = A*L/2*ro(dtau).*sinc(domega*T/2/pi).*cos(domega*T/2 ...
    +dphi(j))+sco_IQ*randn(N_f, N_t);
    Q =- A*L/2*ro(dtau).*sinc(domega*T/2/pi).*sin(domega*T/2 ...
    +dphi(j))+sco_IQ*randn(N_f, N_t);
    X2 = I.^2 + Q.^2;
    Mem(j) = max(max(X2));
end